package com.substation.ui.weight;

import android.view.View;
import android.widget.AdapterView;
import android.widget.TextView;

/**
 * Created by admin on 2018/6/26.
 */

public abstract class MySpinnerOnItemSelectedListener implements AdapterView.OnItemSelectedListener {

    @Override
    public void onNothingSelected(AdapterView<?> adapterView) {

    }

    @Override
    public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
        TextView textView= (TextView) view;
        textView.setGravity(android.view.Gravity.CENTER_HORIZONTAL);   //设置居中
    }
}
